﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SacNetUg.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<SacNetUG.Models.User>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th></th>
            <th>
                FirstName
            </th>
            <th>
                LastName
            </th>
            <th>
                EmailAddress
            </th>
<%--            <th>
                Street
            </th>
            <th>
                Street2
            </th>
            <th>
                City
            </th>
            <th>
                State
            </th>
            <th>
                ZipCode
            </th>
            <th>
                HomePhoneNumber
            </th>
            <th>
                CellPhoneNumber
            </th>--%>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Edit", "Edit", new { id=item.Id }) %>
                <%= Html.ActionLink("Delete", "Delete", new { id=item.Id }) %>
            </td>
            <td>
                <%= Html.Encode(item.FirstName) %>
            </td>
            <td>
                <%= Html.Encode(item.LastName) %>
            </td>
            <td>
                <%= Html.Encode(item.EmailAddress) %>
            </td>
<%--            <td>
                <%= Html.Encode(item.Street) %>
            </td>
            <td>
                <%= Html.Encode(item.Street2) %>
            </td>
            <td>
                <%= Html.Encode(item.City) %>
            </td>
            <td>
                <%= Html.Encode(item.State == null ? "" : item.State.Abbreviation)%>
            </td>
            <td>
                <%= Html.Encode(item.ZipCode) %>
            </td>
            <td>
                <%= Html.Encode(item.HomePhoneNumber) %>
            </td>
            <td>
                <%= Html.Encode(item.CellPhoneNumber) %>
            </td>--%>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("Create New", MVC.User.Create()) %>
    </p>

</asp:Content>

